﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Char ch;
            textBox2.Text = "";
            progressBar1.Maximum = textBox1.Text.Length;
            for (int i = 0; i < textBox1.Text.Length; i++)
            {
                ch = textBox1.Text[i];
                ch++;
                textBox2.Text += ch.ToString();
                progressBar1.Value = i;
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Char ch;
           textBox2.Text  = "";
           progressBar1.Maximum = textBox1.Text.Length;
           for (int i = 0; i < textBox1.Text.Length;i++ )
           {
               ch = textBox1.Text[i];
               ch--;
               textBox2.Text += ch.ToString();
               progressBar1.Value = i;
           }
            

        }
    }
}
